<template>
  <div id="App">
    <!-- <el-button type="primary">主要按钮</el-button> -->

    <!-- ======================= 对话框组件 -->
    <el-button type="primary" @click="dialogVisible = true"
      >点击打开 Dialog</el-button
    >

    <el-dialog title="哎呀有!" :visible.sync="dialogVisible" width="39%">
      <!-- <span>这是一段信息</span> -->
      <!-- 123 -->
      <template #default>
        <el-form label-width="80px">
          <el-form-item label="用户名">
            <el-input
              v-model="user.username"
              placeholder="请输入用户名"
              prefix-icon="el-icon-s-custom"
            />
          </el-form-item>
          <!-- <el-form-item label="密码">
            <el-input
              show-password
              v-model="user.password"
              placeholder="请输入密码"
              prefix-icon="el-icon-lock"
            />
          </el-form-item> -->
          <el-form-item label="密码">
            <el-input
              v-model="user.password"
              prefix-icon="el-icon-lock"
              placeholder="输入密码"
              show-password
            />
          </el-form-item>
        </el-form>
      </template>
      <el-input
        placeholder="请输入密码"
        v-model="input"
        show-password
      ></el-input>
      <!-- <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >确 定</el-button
        >
      </span> -->
      <template #footer>
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >确 定</el-button
        >
      </template>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data () {
    return {
      user: {
        username: '',
        password: ''
      },
      dialogVisible: false
    }
  }
}
</script>

<style>
.el-input__inner {
  width: 80% !important;
}
</style>
